FreeOTFE logo FreeOTFE
Free disk encryption software for PCs and PDAs
(PDA version of WWW site)

Command Line Interface

Both the PC and PDA version support passing parameters via a command line interface.


PC Version

Synopsis

FreeOTFE.exe /mount /volume <volume> [/freeotfe | /linux] [/readonly] [/drive <drive letter>]
[/keyfile <keyfile>] [/lesfile <LES file>]
FreeOTFE.exe /dismount {<drive letter>[:] | all} [/force]

FreeOTFE.exe /count

FreeOTFE.exe /portable {start | on | 1 | stop | off | 0 | toggle} [/silent]

FreeOTFE.exe /drivercontrol gui
FreeOTFE.exe /drivercontrol count [/type {total | portable | installed}]
FreeOTFE.exe /drivercontrol install /filename {<driver filename> | all} [/silent]
FreeOTFE.exe /drivercontrol uninstall /drivername {<driver name> | all} [/silent]

Description

FreeOTFE supports a number of command line options that allow a number of its main functions to be carried out from the command line or via MS Windows shortcuts.

Options

Note that "-" may be substituted in place of "/", if required.

Note: Although there is currently no option to specify which drive letter a volume should be mounted as, this may be set on any given FreeOTFE volume by selecting "Tools | Change volume/keyfile password/details..."

/count
Count the number of mounted volumes. Exit code indicates the appropriate number (or error code; see below)
/dismount {<drive letter>[:] | all}
Dismount indicated drive/all drives
/drive <drive letter>
Drive letter to be used when mounting the volume
/drivercontrol count [/type {total | portable | installed}]
Return count of drivers as exit code; total drivers present/count installed in portable mode/count formally installed. If "/type" is not specified, "/type total" is assumed
/drivercontrol gui
Display driver control dialog
/drivercontrol install /filename {<driver filename> | all}
Install specified driver, or all drivers in the current working directory
/drivercontrol uninstall /drivername {<driver name> | all}
Uninstall specified driver, or all installed drivers. Note that this takes the driver name, not the driver's filename (Important: Don't attempt to uninstall drivers which are currently in use; e.g. by a mounted volume)
/force
When dismounting, force dismount (emergency dismount)
/freeotfe
The specified volume is a FreeOTFE volume. If a volume type (FreeOTFE/Linux) isn't specified, the user will be prompted for this information.
/keyfile <keyfile>
Keyfile to be used when mounting a FreeOTFE volume. Only valid when mounting FreeOTFE volumes
/lesfile <LES file>
File from which to read Linux encryption settings from. Only valid when mounting non-LUKS Linux volumes
/linux
The specified volume is a Linux volume. If a volume type (FreeOTFE/Linux) isn't specified, the user will be prompted for this information.
/mount
Mount indicated file/partition
/portable {start | on | 1 | stop | off | 0 | toggle}
Turn on/off portable mode
/readonly
Mount the volume readonly
/silent
Used when installing/uninstalling drivers and changing portable mode to suppress dialogs
/volume <volume>
The volume filename/partition to be used. When using a volume file, this should be set to the full path and filename of a volume file. Partitions should be specified in the form: "\Device\HarddiskX\PartitionY", where X is 0 based, while Y starts from 1 to indicate a particular partition, or 0 to indicate the entire disk.
Important: If the volume filename has any spaces in it, then it should be enclosed in double quotes (").

Note: Under Windows Vista, the "install" and "uninstall" options require FreeOTFE.exe to be explicitly "runas" an account with administrator privileges, if not being executed from a process which has already been escalated; see examples below. The "/portable" will automatically escalate to administrator privileges, if required

Exit Codes

When run at the command line, FreeOTFE will terminate with one of the following exit codes:

Exit code
Meaning
0 Success
100
Invalid/unrecognised command line
101
Unable to connect to FreeOTFE driver; check driver is installed or portable mode is started
102
Unable to mount volume
103
Unable to dismount volume
104
Unable to start portable mode
105
Unable to stop portable mode
106
The requested operation requires administrative privileges
999
Other error

Examples

Mounting a FreeOTFE volume:
FreeOTFE.exe /mount /volume "C:\My Private Data\my encrypted volume.dat" /freeotfe

Mounting a Linux volume readonly:
FreeOTFE.exe /mount /volume "C:\My Private Data\my encrypted volume.dat" /linux /readonly

Mounting a FreeOTFE partition::
FreeOTFE.exe /mount /volume "\Device\Harddisk0\Partition1" /freeotfe /readonly

Dismount drive "S:":
FreeOTFE.exe /dismount S:

Dismount all volumes, emergency:
FreeOTFE.exe /dismount all /force

Start and stop portable mode:
FreeOTFE.exe /portable start
FreeOTFE.exe /portable stop

Installing drivers (except Windows Vista):
FreeOTFE.exe /drivercontrol install /filename FreeOTFE.sys
FreeOTFE.exe /drivercontrol install /filename FreeOTFEHashSHA.sys
FreeOTFE.exe /drivercontrol install /filename FreeOTFECypherAES_ltc.sys

Installing drivers (Windows Vista):
runas /user:myAdminAccount FreeOTFE.exe /drivercontrol install /filename FreeOTFE.sys
runas /user:myAdminAccount FreeOTFE.exe /drivercontrol install /filename FreeOTFEHashSHA.sys
runas /user:myAdminAccount FreeOTFE.exe /drivercontrol install /filename FreeOTFECypherAES_ltc.sys

Uninstalling drivers (except Windows Vista)::
FreeOTFE.exe /drivercontrol uninstall /drivername FreeOTFE
FreeOTFE.exe /drivercontrol uninstall /drivername FreeOTFEHashSHA
FreeOTFE.exe /drivercontrol uninstall /drivername FreeOTFECypherAES

Uninstalling drivers (except Windows Vista)::
runas /user:myAdminAccount FreeOTFE.exe /drivercontrol uninstall /drivername FreeOTFE
runas /user:myAdminAccount FreeOTFE.exe /drivercontrol uninstall /drivername FreeOTFEHashSHA
runas /user:myAdminAccount FreeOTFE.exe /drivercontrol uninstall /drivername FreeOTFECypherAES


PDA Version

Synopsis

FreeOTFE4PDA.exe /mount /volume <volume> [/keyfile <keyfile>]
[/password <password>] [/mountpoint <mountpoint>] [/freeotfe]
[/readonly] [/offset <offset>] [/nocdbatoffset]
[/keyiterations <keyiterations>] [/saltlength <saltlength>]

FreeOTFE4PDA.exe /dismount {<mountpoint> | all} [/force]

Description

FreeOTFE4PDA supports a number of command line options that allow a number of its main functions to be carried out from the command line or via MS Windows shortcuts.

Options

Note that "-" may be substituted in place of "/", if required.

Important: Any mountpoints or filenames with spaces in them must be enclosed in double quotes (").

/dismount {<mountpoint> | all}
Dismount indicated volume/all mounted volumes.
/force
When dismounting, force dismount (emergency dismount)
/freeotfe
The specified volume is a FreeOTFE volume. At time of writing, this parameter has no effect
/keyfile <keyfile>
The keyfile to be used. If specified, this must be set to the full path and filename of the keyfile.
/keyiterations <keyiterations>
The number of key iterations
/mount
Mount indicated file/partition
/mountpoint <mountpoint>
The mountpoint where the volume is to appear.
/nocdbatoffset
Indicates that there is no CDB at the offset with the volume. This parameter has no effect unless the "/keyfile" parameter is specified
/offset <offset>
The offset within the file (in bytes)
/password <password>
The password to be used. It is not recommended that this is used; particularly in shortcuts, as this would involve storing your password in plaintext such that anyone can read it!
/readonly
Mount the volume readonly
/saltlength <saltlength>
The length of the salt (in bits)
/volume <volume>
The volume filename/partition to be used. This should be set to the full path and filename of a volume file.

Exit Codes

When run at the command line, FreeOTFE will terminate with one of the following exit codes:

Exit code
Meaning
0 Success
100
Invalid/unrecognised command line
101
n/a
102
Unable to mount volume
103
Unable to dismount volume
104
n/a
105
n/a

Examples

Mounting a FreeOTFE volume:
FreeOTFE4PDA.exe /mount /volume "\Storage Card\my encrypted volume.dat"

Dismount volume mounted at "\FreeOTFE secure":
FreeOTFE4PDA.exe /dismount "FreeOTFE secure"

Dismount all volumes, emergency:
FreeOTFE4PDA.exe /dismount all /force